const base = "/"
const timestamp = new Date().getTime();
const postBaseUrl = "http://10.42.113.26:8080/" //部署用

/*url替换规则
 *单个替换用字符串
 *多个替换用数组从左到右
 */

const apiList = {
    //获取所有用户信息
    GET_USER_ALL: {
        url: "/door/users?pagenum={pagenum}&pagesize={pagesize}&keywords={keywords}",
        method: "get"
    },
    GET_HEAD_MENU: {
        url: base + "src/jsons/head-menu.json",
        method: "get"
    },
    GET_FRIEND_LINK: {
        url: base + "src/jsons/friend-link.json",
        method: "get"
    },
    GET_HG_WEATHER: {
        url: "/f/rest/real/57498?_=" + timestamp,
        method: "get"
    },
    USER_LOGIN: {
        url: "/door/loginvalidate",
        method: "post"
    },
    GET_CURRENT_USER: {
        url: "/door/currentuser",
        method: "get"
    },
    USER_LOGOUT: {
        url: "/door/logout",
        method: "get"
    },
    GET_ALL_FILES: {
        // url: "/hgslnw/door/files/{userid}",
        url: "/door/files/10?pagesize=10&pagenum=1",
        method: "get"
    },
    EDIT_USER_INFO: {
        url: "/door/users/{userid}",
        method: "post"
    },
    // 获取所有LOGO
    GET_LOGO_ALL: {
        url: "/door/logos?pagenum={pagenum}&pagesize={pagesize}&userid={userid}",
        method: "get"
    },
    // 获取指定LOGO
    GET_LOGO_TYPE: {
        url: "/door/logos?pagenum={pagenum}&pagesize={pagesize}&type={type}&userid={userid}",
        method: "get"
    },
    // 获取收藏数据
    GET_LOGO_COLLECT: {
        url: "/door/collects/{userid}",
        method: "get"
    },
    // 添加一个收藏
    ADD_LOGO: {
        url: "/door/addcollects",
        method: "POST"
    },
    // 删除一个收藏
    DELETE_LOGO: {
        url: "/door/delcollects",
        method: "POST"
    },

    GET_TYPE_FILE: {
        url: "/door/file/lable?lable={lable}&pagesize={pagesize}&pagenum={pagenum}",
        method: "get"
    },
    // 添加一个日程表
    ADD_ONE_CAL: {
        url: "/door/cal",
        method: "post"
    },
    GET_ALL_CALS: {
        url: "/door/cal?userid={userid}&state={state}",
        method: "get"
    },
    DEL_ONE_CAL: {
        url: "/door/cal/{calid}",
        method: "get"
    },
    EDIT_ONE_CAL: {
        url: "/door/cal/{calid}",
        method: "post"
    },
    // 获取新闻和通知和文件的分页接口,如果type传入some则为文件的不分页的接口
    GET_NEWS_LIST: {
        url: "/jeecms/Jc_acquisition_history/{type}?pagesize={pagesize}&pagenum={pagenum}",
        method: "get"
    },
    // 获取文件的不分页的接口
    GET_NEWS_LIST_NOPAGE: {
        url: "/jeecms/Jc_acquisition_history/nopage/{type}",
        method: "get"
    },
    // 获取所有部门列表
    GET_DEPT_LIST: {
        url: "/src/jsons/dept-tree-config.json",
        method: "get"
    },
    // 根据部门类型获取用户列表
    GET_USERS_BY_DEPT: {
        url: "/door/users/type?type={type}",
        method: "get"
    },
    // 根据部门类型获取所有部门
    GET_DEPTS_BY_DEPT: {
        url: "/door/depts",
        method: "post"
    },

    //获取一段时间内的雨情简报
    GET_RAIN: {
        url: postBaseUrl + "SSM/HGrainreport",
        method: "post"
    },
    // 获取一段时间内的山洪雨情简报
    GET_MON_RAIN: {
        url: postBaseUrl + "SSM/SHrainreport",
        method: "post"
    },
    // 获取一段时间内的水库水情简报
    GET_KU_RAIN: {
        url: postBaseUrl + "SSM/HGrsvrreport",
        method: "post"
    },
    // 获取一段时间内的江河水情简报
    GET_JIANG_RAIN: {
        url: postBaseUrl + "report/riverstation/{start}",
        method: "get"
    },
    // 获取一段时间内的涵闸水情简报
    GET_ZHA_RAIN: {
        url: postBaseUrl + "report/gethanzhastattion/{start}",
        method: "get"
    },
    // 获取一段时间内的山洪水情简报
    GET_HONG_RAIN: {
        url: postBaseUrl + "report/getSHwaterstattion/{start}",
        method: "get"
    },




    //获取当日雨量
    GET_TODAY_RAIN: {
        url: postBaseUrl + "SSM/getrainlist?pagesize={pagesize}&pagenum={pagenum}&keywords={keywords}",
        method: "get"
    },
    GET_TODAY_RAIN_: {
        url: postBaseUrl + "SSM/getrainlist?pagesize={pagesize}&pagenum={pagenum}",
        method: "get"
    },
    //获取当前长江水位
    GET_TODAY_CJLEVEL: {
        url: postBaseUrl + "SSM/getrainlist?pagesize={pagesize}&pagenum={pagenum}&keywords={keywords}",
        method: "get"
    },
    //获取当前水库水位
    GET_TODAY_RESERVOIR: {
        url: postBaseUrl + "SSM/getrsvrlist?pagesize={pagesize}&pagenum={pagenum}&keywords={keywords}",
        method: "get"
    },
    GET_TODAY_RESERVOIR_: {
        url: postBaseUrl + "SSM/getrsvrlist?pagesize={pagesize}&pagenum={pagenum}",
        method: "get"
    },
    //获取当日河道水情
    GET_TODAY_RIVER: {
        url: postBaseUrl + "SSM/getST_RIVER_Rlist?pagesize={pagesize}&pagenum={pagenum}&keywords={keywords}",
        method: "get"
    },
    GET_TODAY_RIVER_: {
        url: postBaseUrl + "SSM/getST_RIVER_Rlist?pagesize={pagesize}&pagenum={pagenum}",
        method: "get"
    },
    GET_NOTICE_LIST: {
        url: "/door/notice?pagesize={pagesize}&pagenum={pagenum}",
        method: 'get'
    },
    GET_ONE_NOTICE: {
        url: "/door/notice/{noticeid}",
        method: 'get'
    }
}

export default apiList